﻿package {
	import flash.display.MovieClip;
	import flash.events.*;

	public class ServerMain extends MovieClip {
		
		private var mySocket:Server;
		
		public function ServerMain() {
			mySocket = new Server("123456789");
			mySocket.socketConnect("192.168.8.12",5001);
			mySocket.socketSend("mymessage");
			mySocket.addEventListener(ApplySocketEvent.SYNC,onDatas);
//			sub_btn.addEventListener(MouseEvent.CLICK,onMouseClick);
		}
		public function onDatas(e:ApplySocketEvent):void {
//			msg_txt.text = e.data + "\n";
		}
		public function onMouseClick(event:MouseEvent):void {
//			if (int_txt.text == "")
//			{
//				msg_txt.appendText("注意：不能发空信息！\n");
//				return;
//			} else
//			{
//				mySocket.socketSend(int_txt.text);
//			}
		}
	}
}